var app = angular.module('webapp');
app.service('WarrantyService', ['$http','$q', WarrantyService]);

function WarrantyService($http , $q){
	return {
		getLevel2Menu:function(data){
			return handleRequest('GET','/getLevel2Menu',data,$http,$q);
		},
		getPower:function(data){
			return handleRequest('GET','/getPower',data,$http,$q);
		},
		getWarrantyAll:function(data){
			return handleRequest('GET','/getWarrantyAll',data,$http,$q);
		},
		addWarranty:function(data){
			return handleRequest('POST','/addWarranty',data,$http,$q);
		},
		uploadWarranty:function(data){
			return handleRequest('POST','/uploadWarranty',data,$http,$q);
		},
		removeWarranty:function(data){
			return handleRequest('POST','/removeWarranty',data,$http,$q);
		}
	};
}